import request from '@/utils/request'

// 查询BOM类别关联列表
export function listAsscategory(query) {
  return request({
    url: '/bomcostestimation/basedocument/asscategory/list',
    method: 'get',
    params: query
  })
}

// 查询BOM类别关联详细
export function getAsscategory(id) {
  return request({
    url: '/bomcostestimation/basedocument/asscategory/' + id,
    method: 'get'
  })
}

// 新增BOM类别关联
export function addAsscategory(data) {
  return request({
    url: '/bomcostestimation/basedocument/asscategory',
    method: 'post',
    data: data
  })
}

// 修改BOM类别关联
export function updateAsscategory(data) {
  return request({
    url: '/bomcostestimation/basedocument/asscategory',
    method: 'put',
    data: data
  })
}

// 删除BOM类别关联
export function delAsscategory(id) {
  return request({
    url: '/bomcostestimation/basedocument/asscategory/' + id,
    method: 'delete'
  })
}


// 导入类别
export function importData(list) {
  return request({
    url: '/bomcostestimation/basedocument/asscategory/importData',
    method: 'post',
    data: list,
    timeout: 1800000
  })
}
